package com.flashflexpro.flexdirector.model{
    import flash.events.Event;

    [Bindable]
    [RemoteClass]
    public class DescProperty{

        public var name:String;
        public var codecName:String;
        public var forDescription:Boolean;
        public var forVerification:Boolean;
        public var defaultValue:String;
        public var isStyle:Boolean = false;
        private var _asType:String;

        [Bindable(event="asTypeChanged")]
        public function get asType():String{
            return _asType;
        }

        public function set asType( value:String ):void{
            if( value == null ){
                //todo: I'm not sure why adobe is doing this, but it's messing up with FlexDirector
                trace( this + ".asType becoming null!!!!!" );
                return;
            }
            if( value != _asType ){
                _asType = value;
                dispatchEvent( new Event( "asTypeChanged" ) );
            }
        }

        public function clone():DescProperty{
            var rt:DescProperty = new DescProperty();
            rt.name = name;
            rt.codecName = codecName;
            rt.forDescription = forDescription;
            rt.forVerification = forVerification;
            rt.defaultValue = defaultValue;
            rt.asType = asType;
            return rt;
        }
    }
}